import random

def generate_data(num, range_start, range_end):
    data = []
    for i in range(num):
        data.append(random.randint(range_start, range_end))
    return data